package com.wfl.sampling.service;


import com.wfl.sampling.entity.*;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;

/**
 * @ Author     ：gfj
 * @ Date       ：Created in 10:16 2018/12/19
 * @ Description：
 * @ Modified By：
 */
public interface UserService {

    User findByEmail(String email);

    User findByPhone(String phone);

    int createUser(User user);

    void updateLastLogin(int id);

    User getUserById(int id);
    void saveUserInfoById(User user);
    HashMap<String, ArrayList<User>> getUserRelationship(Integer id);
    String followOnUser(Integer userId,Integer followUser);
    String followOffUser(Integer userId,Integer followUser);
    String conversionBuilding(Integer userId,Integer otherId);
    ArrayList<UserMessageDo> getUserMessage(Integer userId, Integer otherId);
    String saveConversionMessage(Integer userId, Integer otherId,String message);
    List<MessageListDo> getMessageList(Integer userId);

    Result getSessionId(String code);
    Result getUserIdByOpenId(String sessionId);

    Result authLogin(WXAuth wxAuth) throws Exception;

    Result register(User user);

    Result login(User user);

    Result weChatLogin(User user);
}
